package com.pactera.madp.cp.controller.sidebar.contact;

import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.api.vo.contact.ContactTagGroupIndexVO;
import com.pactera.madp.cp.handler.CorpContextHolder;
import com.pactera.madp.cp.service.IWorkContactTagGroupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * WorkContactTagGroupWeChatController
 *
 * @author jun
 * @version 1.0
 * 2021/6/29 16:09
 **/
@RestController
@AllArgsConstructor
@RequestMapping("/workcontacttaggroupwechat")
@Api(value = "workcontacttaggroupwechat", tags = "客户标签分组管理-微信")
public class WorkContactTagGroupWeChatController {

    IWorkContactTagGroupService workContactTagGroupService;

    @GetMapping
    @ApiOperation(value = "标签分组列表-微信")
    public R<List<ContactTagGroupIndexVO>> getIndex(HttpServletRequest request){
        return R.ok(workContactTagGroupService.getIndexListWeChat(CorpContextHolder.getCorpId()));
    }

}
